package 简单工厂模式;

public class TVFactory {
    public static TV produceTV(String brand) {
        if(brand.equals("xiaomi")) {
            return new xiaomiTV();
        }else if(brand.equals("tcl")) {
            return new tclTV();
        }else {
            System.out.println("不能生产这个品牌电视");
            return null;
        }
    }
}
